<?php
include($modRootPath.'lib/dbaConf.o.inc.php');

if (!$usr->checkPermission($env->getParam('instance').'_mod_gallery_conf','v'))
{
    print "<b>Sie haben nicht die entsprechenden Rechte, um diese Einstellung zu sehen!</b>";
    exit;
}

$fdba = new dbaConf($udba);

if (!$fdba->exists($instance))
{
    $fdba->insert($instance, 200, 200, 450, 450, 3, 2);
}

if ($env->getParam('action')=='update' && $usr->checkPermission($env->getParam('instance').'_mod_gallery_conf','u'))
{
    $fdba->update($instance, $env->getParam('thumb_height'), $env->getParam('thumb_width'), $env->getParam('height'), $env->getParam('width'), $env->getParam('rows'), $env->getParam('cols'));
}

$field = $fdba->get($instance);

?>
<script language="javascript" src="<?=$modRootUrl?>lib/js/ua.js">
</script>
<script language="javascript">
<!--
    function createImage (src,width,height)
    {
        var img = new Image(width,height)
        img.src = src
        return img
    }
    
    var rmouse = createImage('<?=$modRootUrl?>lib/img/rainbow_mouse.gif',27,23)
//-->
</script>
<form action="<?=$formaction?>" method="POST" name="dbform" onsubmit="document.working_mouse.src=rmouse.src">
<input type="hidden" name="action" value="update">
<input type="hidden" name="instance" value="<?=$env->getParam('instance')?>">
<input type="hidden" name="module" value="<?=$env->getParam('module')?>">
<input type="hidden" name="target" value="<?=$env->getParam('target')?>">
<table border="0" cellpadding="5" cellspacing="0">
<tr>
   <td bgcolor="#3FB2EB" colspan="2">
    <b>Einstellungen &auml;ndern:</b> <img src="<?=$modRootUrl?>lib/img/0.gif" width="27" height="23" align="middle" id="working_mouse" /></td>
</tr>
<tr>
   <td bgcolor="#E0F6FD">
    Max H&ouml;he eines Thumbnails:</td>
    <td bgcolor="#E0F6FD">
        <input type="text" name="thumb_height" value="<?=$field['thumb_height']?>" size="15" />
    </td>
</tr>
<tr>
   <td bgcolor="#E0F6FD">
    Max Breite eines Thumbnails:</td>
    <td bgcolor="#E0F6FD">
        <input type="text" name="thumb_width" value="<?=$field['thumb_width']?>" size="15" />
    </td>
</tr>
<tr>
   <td bgcolor="#E0F6FD">
    Max H&ouml;he eines Bildes:</td>
    <td bgcolor="#E0F6FD">
        <input type="text" name="height" value="<?=$field['height']?>" size="15" />
    </td>
</tr>
<tr>
   <td bgcolor="#E0F6FD">
    Max Breite eines Bildes:</td>
    <td bgcolor="#E0F6FD">
        <input type="text" name="width" value="<?=$field['width']?>" size="15" />
    </td>
</tr>
<tr>
   <td bgcolor="#E0F6FD">
    Zeilen in Thumbnailansicht:</td>
    <td bgcolor="#E0F6FD">
        <input type="text" name="rows" value="<?=$field['rows']?>" size="15" />
    </td>
</tr>
<tr>
   <td bgcolor="#E0F6FD">
    Spalten in Thumbnailansicht:</td>
    <td bgcolor="#E0F6FD">
        <input type="text" name="cols" value="<?=$field['cols']?>" size="15" />
    </td>
</tr>
<tr>
   <td bgcolor="#E0F6FD" colspan="2" align="center">
    <input type="submit" class="button" value="&auml;ndern" /> <input type="reset" class="button" value="zur&uuml;cksetzen" /></td>
</tr>
</table><br /><br/>
</form>
